﻿@{
    ViewData["Title"] = "Admin";
}
<div class="container">
    <div class="userinfo col-12">
        <form id="userinfo" action="/Admin/AddTestPaper" method="post">
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">试卷名称:</span>
                </div>
                <input type="text" class="form-control col-4" id="papername" name="papername" value="@ViewBag.Papers.Tables[0].Rows[0][1]">
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">试卷简述:</span>
                </div>
                <input type="text" class="form-control col-4" id="introduce" name="introduce" value="@ViewBag.Papers.Tables[0].Rows[0][2]">
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">总分乘积:</span>
                </div>
                <input type="text" class="form-control col-4" id="gradeproduct" name="gradeproduct" value="@ViewBag.Papers.Tables[0].Rows[0][3]">
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择1名称:</span>
                </div>
                <input type="text" class="form-control col-4" id="select1_name" name="select1_name" value="@ViewBag.Papers.Tables[0].Rows[0][4]">
            </div>
            @*<div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择1分数:</span>
                </div>
                <input type="text" class="form-control col-4" id="select1_score" name="select1_score" value="@ViewBag.Papers.Tables[0].Rows[0][5]">
            </div>*@
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择2名称:</span>
                </div>
                <input type="text" class="form-control col-4" id="select2_name" name="select2_name" value="@ViewBag.Papers.Tables[0].Rows[0][5]">
            </div>
            @*<div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择2分数:</span>
                </div>
                <input type="text" class="form-control col-4" id="select2_score" name="select2_score" value="@ViewBag.Papers.Tables[0].Rows[0][7]">
            </div>*@
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择3名称:</span>
                </div>
                <input type="text" class="form-control col-4" id="select3_name" name="select3_name" value="@ViewBag.Papers.Tables[0].Rows[0][6]">
            </div>
            @*<div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择3分数:</span>
                </div>
                <input type="text" class="form-control col-4" id="select3_score" name="select3_score" value="@ViewBag.Papers.Tables[0].Rows[0][9]">
            </div>*@
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择4名称:</span>
                </div>
                <input type="text" class="form-control col-4" id="select4_name" name="select4_name" value="@ViewBag.Papers.Tables[0].Rows[0][7]">
            </div>
            @*<div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text">选择4分数:</span>
                </div>
                <input type="text" class="form-control col-4" id="select4_score" name="select4_score" value="@ViewBag.Papers.Tables[0].Rows[0][11]">
            </div>*@

            <div style="padding-top: 15px">
                <button type="submit" class="btn btn-primary">修改</button>
                <button type="button" class="btn btn-default" onclick="window.location.href = '/Admin/Index'">返回</button>
            </div>
        </form>
    </div>
</div>
<script>
$(document).ready(function () {
    var id = "@ViewData["Userno"]"
    if (id == "") {
        window.location.href = '/';
    };
})
</script>
